package cn.easy;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/5/10 18:08
 */
public class CarFactory {
    public static Car getCar(String carname){
        if(carname == null ) {
            return null;
        }
        if(carname == "wuling"){
            return new Wuling();
        }else if(carname == "Tesla"){
            return new Tesla();
        }
        return null;
    }
}
